\documentclass{absr-wr}
\begin{document}
%% Personal information, only need to be set at the first time
% set full name & abbr. name
\absName{Jiazhen LUO}{LJZ}
% Personal ID
\absAuthorID{ABSR-04}
% Email
\absEmail{charlie@hellocharlie.top}

%% Packages, Personal commands or macros
\newcommand{\mfloor}[1]{ \left\lfloor {#1} \right\rfloor }
\newcommand{\mpair}[2]{ \left\langle {#1}, {#2} \right\rangle}

\renewcommand{\bf}[1]{\mathbf{#1}}

\renewcommand{\vec}[1]{\boldsymbol{#1}}
\newcommand{\trans}[1]{#1^\textsf{T}}
\newcommand{\fvec}[1]{\boldsymbol{#1}(t)}
\newcommand{\dt}{\mathrm{d}t}
\newcommand{\dx}{\mathrm{d}x}
\newcommand{\derive}{\frac{\mathrm{d}}{\dt}}
\newcommand{\secref}[1]{Section~\ref{#1}}
\newcommand{\pfrac}[2]{\frac{\partial #1}{\partial #2}}
\newcommand{\mat}[1]{\begin{bmatrix} #1 \end{bmatrix}}
\newcommand{\norm}[1]{\left|\left| #1 \right|\right|}

%% update the document information when writing a new document
% the number of document
\absDocNumber{104}
% type the start date and the end date in the 2 pairs of braces respectively
\absDuration{dd-mm-yyyy}{dd-mm-yyyy}
% the date where the document was completed
\absDate{\today}
%or type likes '\absDate{September 10, 2016}'

%% create title, don't modify it!
\absmakeheader

% if you don't need a contents, comment it
\showcontents

\section{Work}
In the last two weeks, I concentrate on the subject of LQR problems. In the first week, I tried to solve bugs founded in my program. In the second week, I added a module to solve the \textbf{Algebraic Riccati Equation} (ARE) into my program, however, it works bad now.
\subsection{C++ programming}
At the beginning, the use of \verb|std::resize()| cause a segmentation fault, which is very strange because the same code works well in the previous lines. I just used copy and paste commands to create the same codes. I searched the problem on Google and some forums, but all the answers I get from the Internet can't help me. During the debugging time, I learned a new tiny tool to detect memory management problem. For more information, it can refers to its homepage \url{http://valgrind.org/}.

I don't know if it is a good thing or not, the segmentation fault disappeared when I rewrite my code in the same way. So I may never know why it works or why it don't works.

\subsection{Solution for ARE}
After the finite-horizon LQR was fixed, it only rests the infinite-horizon version. In this part, the following equation, ARE, should be solved.
\begin{equation}\label{eq:ARE}
  \vec{PA} + \trans{\vec{A}}\vec{P} + \vec{Q} - \vec{P}\vec{G}\vec{P} = \vec{0}
\end{equation}
The solution for ARE \eqref{eq:ARE} is quite different from RDE, because there is no the term of derivative. I found  a method for solving algebraic Riccati equations in \cite{ARE1979}. The algorithm can be described by the following sequence.
\begin{enumerate}
  \item Construct a matrix $\vec{Z}$ by
  \begin{equation}
    \vec{Z} = \mat{\vec{A} & -\vec{G} \\ -\vec{Q} & -\trans{\vec{A}}}
  \end{equation}

  \item Find an orthogonal matrix $\vec{U}$ which reduces $\vec{Z}$ to real quasi-upper-triangle matrix $\vec{T}_u$ which is also named \textbf{Real Schur Rorm}(RSF)
  \begin{equation}
    \trans{\vec{U}}\vec{Z}\vec{U} = \vec{T}_u
  \end{equation}
  which is known as the Schur decomposition.
  \item Rewrite $U$ by blocks
  \begin{equation}
    \vec{U} = \mat{\vec{U}_{11} & \vec{U}_{12} \\ \vec{U}_{21} & \vec{U}_{22}}
  \end{equation}
  \item Finally, solve the equation
  \begin{equation}
    \vec{P}\vec{U}_{11} = \vec{U}_{21}
  \end{equation}
\end{enumerate}

It looks easy in symbols, but it's not easy to implement it on computer, in that the Schur decomposition.

\subsubsection{QR Algorithm and RSF}
I got some information about RSF from websites and in \cite{zhangxianda2011}, including the Householder transformation, the Givens transformation and the QR algorithm in nonsymmetric eigenvalue problems.

The Schur decomposition or the real Schur form is based on the QR algorithm.

\subsection{Bug in Eigen}
I tried to use Eigen to computer the RSF, but the result is not satisfying enough. The orthogonal returned matrix was in bad condition.


%%****************************************
%%  参考文献
%%****************************************
\bibliographystyle{unsrt}
\end{document} 